import { Modal, Button } from 'antd';
import React from 'react';

class RefuseModal extends React.Component {
  state = {
    visible: false,
    text: '',
    data: '',
  };

  showModal = () => {
    this.setState({
      visible: true,
    });
  };

  handleOk = e => {
    console.log(e);
    this.setState({
      visible: false,
    });
  };

  handleCancel = e => {
    console.log(e);
    this.setState({
      visible: false,
    });
  };

  render() {
    return (
      <div>
        <a href='#!' onClick={this.showModal}>
          拒绝退货
        </a>
        <Modal
          title="这是标题"
          visible={this.state.visible}
          onOk={this.handleOk}
          onCancel={this.handleCancel}
          footer={[
            <Button key="submit" type="primary" onClick={this.handleOk}>确定</Button>,
            <Button key="back" onClick={this.handleCancel}>取消</Button>,
          ]}

        >
          <p>退货原因</p>
          <textarea name="" id="" cols="60" rows="5"></textarea>

        </Modal>
      </div>
    );
  }
}

export default RefuseModal;